<!DOCTYPE html>
<html>
<head>
    <include file="./public/sty.html"/>
</head>
<body>
<div id="app" class="personalInfo">
    <include file="./public/header.html"/>
    <div data-v-98161034="" class="container containerUser fix pt15" s="[object Object]">
        <div class="slideUser">
            <ul class="sildeSession"><h3><span></span>账号管理</h3>
                <li class=""><a href="{:U('Users/personalInfo')}">个人信息</a></li>
                <li class="curr"><a href="{:U('Users/securityCenter')}">安全中心</a></li>
                <li class=""><a href="{:U('Users/manageBankcard2')}">银行卡管理</a></li>
            </ul>
            <ul class="sildeSession"><h3><span></span>投注管理</h3>
                <li><a href="{:U('Users/BetRecord')}" class="">投注记录</a></li>
                <li><a href="{:U('Users/seekOrder')}" class="">追号记录</a></li>
            </ul>
            <ul class="sildeSession"><h3><span></span>资金管理</h3>
                <li><a href="{:U('Users/BillRecord')}" class="">交易记录</a></li>
                <li class=""><a href="{:U('Users/PLstatement')}">今日盈亏</a></li>
            </ul>
            <?php if($info['utype'] == '1'){ ?>
            <ul class="sildeSession">
                <h3><span></span>代理中心</h3>
                <li><a href="{:U('Users/agentIntro')}" class="">代理说明</a></li>
                <li class=""><a href="{:U('Users/agentReport')}">代理报表</a></li>
                <li><a href="{:U('Users/lowerReport')}" class="">下级报表</a></li>
                <li class=""><a href="{:U('Users/manageInvite')}">下级开户</a></li>
                <li><a href="{:U('Users/agentMember')}" class="">会员管理</a></li>
                <li><a href="{:U('Users/agentBetRecord')}" class="">投注明细</a></li>
                <li><a href="{:U('Users/agentBillRecord')}" class="">交易明细</a></li>
            </ul>
            <?php }?>
            <ul class="sildeSession"><h3><span></span>消息管理</h3>
                <li><a href="{:U('Users/letter')}" class="">站内信</a></li>
                <li><a href="{:U('Users/Notice')}" class="">网站公告</a></li>
            </ul>
        </div>
        <div data-v-98161034="" class="userRight">
            <div data-v-98161034="" class="userTitle mgb10">个人信息</div>
            <div data-v-98161034="" class="userMain mgb10">
                <div data-v-98161034="" id="newTab" class="newTab">
					<a href="{:U('Users/personalInfo',array('id'=>$info['userid']))}" class="curr curr" data-v-98161034="">个人资料</a>
					<a href="{:U('Users/personalLevel',array('id'=>$info['userid']))}" class="" data-v-98161034="">等级头衔</a>
				</div>

       <form action="{:U('Users/jiben')}" method="post" enctype="multipart/form-data" id="form">
           <input type="hidden" name="uid" id="uid" value="{$info.userid}">
                <div data-v-98161034="" class="fix tapli">
                    <div data-v-98161034="" class="selectHeadImg">
					<img data-v-98161034="" src="{$info.avatar}" width="100" height="100" alt="" class="headImg">
                    <a data-v-98161034=""  class="fx_xg_photos_btn" >修改头像</a>
				</div>
                    <ul data-v-98161034="" class="personalInfo submitContent">
                        <li data-v-98161034="">
						<span data-v-98161034="">账号：</span> <ins data-v-98161034=""><?php echo $_SESSION['login_name'];?></ins>
                        </li>
                        <li data-v-98161034="">
						<span data-v-98161034="">等级：</span> <ins data-v-98161034="">
                            <?php if($data['score'] < '10'){echo 'VIP1';}
                                  elseif('10' <= $data['score'] && $data['score'] < '200'){echo 'VIP2';}
                                  elseif('200' <= $data['score'] && $data['score'] < '1000'){echo 'VIP3';}
                                  elseif('1000' <= $data['score'] && $data['score'] < '10000'){echo 'VIP4';}
                                  elseif('10000' <= $data['score'] && $data['score'] < '50000'){echo 'VIP5';}
                                  elseif('50000' <= $data['score'] && $data['score'] < '250000'){echo 'VIP6';}
                                  elseif('250000' <= $data['score'] && $data['score'] < '1000000'){echo 'VIP7';}
                                  elseif('1000000' <= $data['score'] && $data['score'] < '5000000'){echo 'VIP8';}
                                  elseif('5000000' <= $data['score']){echo 'VIP9';}; ?>
                        </ins>
                        </li>
                        <li data-v-98161034="">
						<span data-v-98161034="">头衔：</span> <ins data-v-98161034="">
                            <?php if($data['score'] < '10'){echo '农民';}
                                  elseif('10' <= $data['score'] && $data['score'] < '200'){echo '地主';}
                                  elseif('200' <= $data['score'] && $data['score'] < '1000'){echo '知县';}
                                  elseif('1000' <= $data['score'] && $data['score'] < '10000'){echo '通判';}
                                  elseif('10000' <= $data['score'] && $data['score'] < '50000'){echo '知府';}
                                  elseif('50000' <= $data['score'] && $data['score'] < '250000'){echo '总督';}
                                  elseif('250000' <= $data['score'] && $data['score'] < '1000000'){echo '巡抚';}
                                  elseif('1000000' <= $data['score'] && $data['score'] < '5000000'){echo '丞相';}
                                  elseif('5000000' <= $data['score']){echo '帝王';}; ?>
                        </ins>
                        </li>
                        <li data-v-98161034="">
						<span data-v-98161034="">昵称：</span> <input name="nickname" value="{$info.nickname}" id="nickname" data-v-98161034=""  tag="昵称" placeholder="请输入昵称" type="text" class="userInput" ><span class="yz1"></span>
						</li>

                        <li data-v-98161034="">
						<span data-v-98161034="">手机：</span> <input name="mobile" value="{$info.mobile}" disabled="disabled"  id="mobile" data-v-98161034="" type="text" class="userInput">
						    <?php if(trim($info['mobile'])==''){ ?>
                                <a href="{:U('Users/setMobile',array('id'=>$info['userid']))}" class="" notsubmit="yes" data-v-98161034="">绑定手机</a>
                            <?php }else{ ?>
                                <a href="{:U('Users/setMobile',array('id'=>$info['userid']))}" class="" notsubmit="yes" data-v-98161034="">修改手机</a>
                            <?php } ?>
                        </li>
                        <li data-v-98161034="">
						<span data-v-98161034="">邮箱：</span> <input data-v-98161034="" name="email" value="{$info.email}" id="email" type="text" disabled="disabled" class="userInput">
                            <?php if(trim($info['email'])==''){ ?>
                                <a href="{:U('Users/setMail',array('id'=>$info['userid']))}" class="" notsubmit="yes" data-v-98161034="">绑定邮箱</a>
                            <?php }else{ ?>
                                <a href="{:U('Users/setMail',array('id'=>$info['userid']))}" class="" notsubmit="yes" data-v-98161034="">修改邮箱</a>
                            <?php } ?>
                        </li>
                        <li data-v-98161034="">
						<span data-v-98161034="">QQ：</span> <input name="qq" id="qq" value="<?php if(trim($info['qq'])=='0'){echo '';}else{echo $info['qq'];} ?>" data-v-98161034="" placeholder="QQ号为5-12位数字" tag="QQ号码"  type="text" class="userInput"><span class="yz2"></span>
                        </li>
                        <li data-v-98161034="">
							<span data-v-98161034="">性别：</span>
							<label data-v-98161034="" class="radio_box <?php if($info['sex']==1)echo 'checked'; ?>" name="sex"   data-value="1">
								<i data-v-98161034="" ></i>男
							</label>
							<label data-v-98161034="" class="radio_box  <?php if($info['sex']==2)echo 'checked'; ?>" name="sex"  data-value="2">
								<i data-v-98161034="" ></i>女
							</label>
							<label data-v-98161034="" class="radio_box <?php if($info['sex']==3)echo 'checked'; ?>"  name="sex" data-value="3">
								<i data-v-98161034=""  ></i>保密
							</label>
						</li>
                        <li data-v-98161034=""><span>生日：</span>

                            <?php if(trim($info['birth'])==''){ ?>
                                <select class="sel_year" rel="{$str[0]}" style="width: 80px;height: 28px;" name="year"  id="year"></select> 年
                                <select class="sel_month" rel="{$str[1]}" style="width: 40px;height: 28px;" name="math" id="math"></select> 月
                                <select class="sel_day" rel="{$str[2]}" style="width: 50px;height: 28px;" name="day" id="day"></select> 日 <span class="yz3"></span>
                            <?php }else{ ?>
                                   {$info.birth}
                            <?php }?>
                        </li>
                        <li data-v-98161034="" style="width:400px;text-align: center"><span data-v-98161034=""></span>
							<a  data-v-98161034="" onclick="sav()" class="submitBtn">保存</a>
						</li>
                    </ul>
                </div>
           </form>
            </div>
        </div>
        </div>
        <div data-v-3d78d95d=""  class="fx_xg_photos"   style="display: none;">
            <div data-v-3d78d95d="" class="layerBg"></div>
            <div data-v-3d78d95d="" class="layerBox">
                <div data-v-3d78d95d="" class="headImgList">
                    <div data-v-3d78d95d="" class="headImgListTitle">修改头像 <a data-v-3d78d95d="" class="close"></a></div>
                    <div data-v-3d78d95d="" class="headImgContent">
                        <a data-v-3d78d95d="" title="奥巴马" class=""><img data-v-3d78d95d="" src="/style/images/pimg1.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="比尔盖茨" class=""><img data-v-3d78d95d="" src="/style/images/pimg14.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="本拉登" class=""><img data-v-3d78d95d="" src="/style/images/pimg9.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="普京" class=""><img data-v-3d78d95d="" src="/style/images/pimg22.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="贝克汉姆"class=""><img data-v-3d78d95d="" src="/style/images/pimg15.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="苍井空" class=""><img data-v-3d78d95d="" src="/style/images/pimg25.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="泷泽萝拉" class=""><img data-v-3d78d95d="" src="/style/images/pimg3.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="波多野结衣" class=""><img data-v-3d78d95d="" src="/style/images/pimg23.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="希拉里" class=""><img data-v-3d78d95d=""  src="/style/images/pimg19.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="范冰冰" class=""><img data-v-3d78d95d="" src="/style/images/pimg8.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="小男孩" class="curr"><img data-v-3d78d95d=""  src="/style/images/pimg17.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="小女孩" class=""><img data-v-3d78d95d="" src="/style/images/pimg2.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="李敏镐" class=""><img data-v-3d78d95d="" src="/style/images/pimg12.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="梅西" class=""><img data-v-3d78d95d="" src="/style/images/pimg7.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="罗纳尔多" class=""><img data-v-3d78d95d="" src="/style/images/pimg15.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="萨达姆" class=""><img data-v-3d78d95d="" src="/style/images/pimg10.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="金正恩" class=""><img data-v-3d78d95d="" src="/style/images/pimg5.jpg" alt="" class="headImg"></a>
                        <a  data-v-3d78d95d="" title="科比" class=""><img data-v-3d78d95d="" src="/style/images/pimg4.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="全智贤" class=""><img data-v-3d78d95d="" src="/style/images/pimg20.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="林允儿" class=""><img data-v-3d78d95d="" src="/style/images/pimg21.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="宋慧乔" class=""><img data-v-3d78d95d="" src="/style/images/pimg11.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="朴信惠" class=""><img data-v-3d78d95d="" src="/style/images/pimg18.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="宋承宪" class=""><img data-v-3d78d95d="" src="/style/images/pimg16.jpg"  alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="宋仲基" class=""><img data-v-3d78d95d="" src="/style/images/pimg13.jpg" alt="" class="headImg"></a>
                        <a data-v-3d78d95d="" title="杰森斯坦森" class=""><img data-v-3d78d95d="" src="/style/images/pimg6.jpg" alt="" class="headImg"></a>
                    </div>
                    <div data-v-3d78d95d="" class="headImgView"><h5 data-v-3d78d95d="">预览</h5>
                        <p data-v-3d78d95d="">100x100</p>
						<img data-v-3d78d95d="" src="/style/images/pimg1.jpg" alt="">
                        <input type="hidden" name="imgSrc" id="imgSrc">
                        <input type="hidden" name="imgName">
                        <h5 data-v-3d78d95d="" class="theName" style="color: rgb(83, 168, 241);"></h5>

                        <div data-v-3d78d95d="" class="button">
							<a data-v-3d78d95d="" class="submitBtn" onclick="sav_inages()">保存头像</a>
							<a data-v-3d78d95d="" class="submitBtn cancel">取消</a>
						</div>
                    </div>
                </div>
            </div>
        </div>

    </div>
    <include file="./public/footer.html"/>
</div>


<script src="/style/js/jquery.min.js"></script>
<script type="text/javascript" src="/style/js/jquery.js"></script>
<script src="/style/js/fx.js"></script>
<script type="text/javascript" src="/style/js/birthday.js"></script>
<script>
	$(function () {
		$.ms_DatePicker({
			YearSelector: ".sel_year",
			MonthSelector: ".sel_month",
			DaySelector: ".sel_day"
		});
		$.ms_DatePicker();
	});
</script>
<script>
   $(function(){
       personalInfo();
	   $(".radio_box").click(function (){
		   $(this).addClass("checked").siblings(".radio_box").removeClass("checked");
	   })
       $(".fx_xg_photos_btn").click(function(){
           var src = $(this).siblings("img").attr("src");
           $(".headImgView img").attr("src",src);
           $(".fx_xg_photos").show();

       });
       $(".fx_xg_photos .headImg").click(function(){
           var src = $(this).attr("src");
           var tit = $(this).parent("a").attr("title");
           $(".headImgView img").attr("src",src);
           $(".headImgView input[name='imgSrc']").val(src);
           $(".headImgView input[name='imgName']").val(tit);
           $(".theName").text(tit);
       });
       $(".cancel,.close").click(function(){
           $(".fx_xg_photos").hide();
       })
   });
   //保存基本信息
</script>
</body>
</html>
<script>
    function sav_inages(){
        var id = $("#uid").val();
        var images = $("#imgSrc").val();
        $.ajax({
            type: "POST",
            url: "{:U('Users/upd_image')}",
            data: {'id':id,'images':images},
            success: function(dat){
                if(dat==1){
                    window.location.href="{:U('Users/personalInfo')}";
                }
            }
        });
    }

    function sav(){
        var id = $("#uid").val();
        var nickname = $("#nickname").val();  //昵称
        var sex = $('.radio_box.checked').data("value");  //性别
        var qq = $("#qq").val();  //昵称
        var year = $("#year").val();  //年
        var math = $("#math").val();  //月
        var day = $("#day").val();  //日

        if (nickname == '') {
            $(".yz1").html("<font color='red'>昵称不能为空</font>");
            return false;
        } else {
            $(".yz1").html("");
        }
        if (qq == '') {
            $(".yz2").html("<font color='red'>qq不能为空</font>");
            return false;
        }else {
            $(".yz2").html("");
        }
        if(!(/^[1-9]\d{4,8}$/.test(qq))){ //qq号正则匹配
            $(".yz2").html("<font color='red'>qq格式错误</font>");
            return false;
        }else {
            $(".yz2").html("");
        }

        $.ajax({
            type: "POST",
            url: "{:U('Users/jiben')}",
            data: {'id':id,'nickname':nickname,'xingbie':sex,'qq':qq,'year':year,'math':math,'day':day},
            success: function(dat){
                if(dat==1){
                    window.location.href="/Users/personalInfo";
                }
            }
        });
    }

</script>